<ui:composition template="/template/template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

    <ui:define name="item-menu">
        <h:link value="Home" outcome="index.xhtml"/>
    </ui:define>

	<ui:define name="logo-curso">
    <h:form id="form">
    <p:messages id="messages" showDetail="false" globalOnly="true" autoUpdate="true" closable="true" />  
    <h:outputLabel value="CPF: "  styleClass="password"/>    
    <h:inputText value="#{homeMB.cpf}" size="30"/>
    <p:commandButton action="#{homeMB.buscarUsuarioPorCpf}" ajax="false" value="buscar" update="senha" />
    
    <h:panelGrid id="senha" columns="2" rendered="#{homeMB.cpfEncontrado}">
    <h:outputText value="Matrícula: #{homeMB.usuario.matricula}"  styleClass="password"/>
    <h:outputText value="#{homeMB.usuario.nome}"  styleClass="password"/>
 
    <h:outputLabel value="Nova senha:" styleClass="password"/>
    <h:inputSecret value="#{homeMB.novaSenha}" />
    
    <h:outputLabel value="Repetir senha:" styleClass="password"/>
    <h:inputSecret value="#{homeMB.repeteSenha}" />
    <p:commandButton action="#{homeMB.alterarSenha}" ajax="false" value="alterar" update="senha" />
    </h:panelGrid>
    
    </h:form>
	</ui:define>


</ui:composition>
